<!-- 我的查询 -->

<template>
  <SecureSearch>
    <ParamStatusMulti bind="statusList" :dict="GETTER.STATUS" hasRight isCheckbox @change="changeStatus" />
    <ParamInput label="门禁点名称" bind="name" />
    <!-- <ParamSelect label="开门状态" bind="doorStatus" :dict="CORE.DICT.STATUS_ACCESS" narrow /> -->
  </SecureSearch>
</template>

<script>
// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'
import MySearch from '@admin/views/System/IOT/IOTList/MySearch'

// ============================== 导出组件 ============================== //

export default {
  /**
   * 名称定义 (实际使用名称)
   */
  name: 'MySearch',

  /**
   * 混入列表 (配置选项合并)
   */
  mixins: [CORE.mixWeb()],

  /**
   * 组件导入 (Abc.vue + Abc/index.vue)
   */
  ...CORE.components(require.context('@admin/views/Secure/components', true, /vue$/)),

  /**
   * 计算属性 (慎用箭头函数)
   */
  computed: MySearch.computed,

  /**
   * 本地方法 (轻量重要在前)
   */
  methods: {
    /**
     * 切换状态
     */
    changeStatus() {
      const { param } = this
      param.queryStatus = param.statusList.length === 1 ? param.statusList[0] : undefined
    },
  },
}
</script>
